1. Field of The Invention
This invention relates to a method for managing a defect in a storage medium (for example, an optical disk (or optical disc)), by which a logical addres is converted into a physical address when the defect occurs in the storage medium.
2. Description of The Related Art
Generally, a storage region in a storage medium such as an optical disk is composed of a user area to be used by an user of a host system, a spare area (or preliminary area) to be used instead of a defective sector other than an initially defective sector which has already been defective at the time of forwarding the storage medium (e.g., an optical disk) and a management area to be used for managing information to be stored in an alternate area. Further, there are the following conventional methods for managing defects in a storage medium: Sector slipping Defect Management method (hereunder abbreviated as SDM); and Linear replacement Defect Management method (hereunder abbreviated as LDM).
SDM is a method for removing a defective sector from an optical disk before a user uses the storage medium for the first time. With this method, logical addresses to be used for accessing the optical disk by the host system are assigned to track numbers of tracks and sector numbers of sectors physically managed in the optical disk other than defective sectors determined by Certification and spare sectors (i.e., preliminary sectors). Incidentally, Certification is an operation of detecting initially defective sectors and correcting defective areas by performing a deletion operation, a write operation and a verification operation on all storage areas of an optical disk.
LDM is a method for removing a defective sector from an optical disk when the defective sector occurs therein after SDM has been performed thereon.
Hereinafter, an example of a defect management operation effected by applying LDM to an optical disk will be described by FIGS. 14 and 15. FIGS. 14 and 15 illustrate algorithms for managing a defect in what is called a full-RAM optical disk which is erasable and re-writable and is now under discussion in International Standardization Organization (ISO). FIG. 14 shows a state of a storage region of an optical disk on which SDM is of a storage region of an optical disk on which SDM is performed.
In FIG. 14, each reference numeral (i.e., 0, 1, . . . or 177) corresponding to a combination of a physical track number (hereunder sometimes referred to as a physical track address) and a physical sector number (hereunder sometimes referred to as a physical sector address) indicates a logical number (hereunder sometimes referred to as a logical address) assigned to a location of a storage region. For instance, a logical address 25 is indicated at and assigned to a location corresponding to the combination of a physical track address 2 and a physical sector address 1. As is seen from this figure, no logical address is assigned to a a defective sector which is represented by St. Andrew's cross x (for example, a sector indicated by the combination of a physical track address 2 and a physical sector address 2), a logical address is assigned to the next sector (namely, a logical address 26 is assigned to a sector indicated by the combination of a physical track address 2 and a physical sector address 3 which is next to this defective sector in the example).
FIG. 15 illustrates a state of an optical disk on which LDM is performed. As is shown in FIG. 15, data to be written to a sector R1 corresponding to the combination of a physical track address 5 and a physical track address, which becomes defective after SDM is performed, is stored in a sector corresponding to a physical track address (hereunder sometimes referred to simply as a track address) 8 and a physical sector address (hereunder sometimes referred to simply as a sector address) 0 of a spare area together with a logical address 65. This results in that when a sector having the logical address 65 is accessed by a host computer or system, the sector indicated by the combination of the track address 8 and the sector 0 is practically accessed. Further, when an alternate sector for a defective sector R2 indicated by the combination of the track address 7 and the sector address 7 is allotted to a sector of a spare area, a defective sector corresponding to a track address 8 and a sector address 1 is not used as the alternate sector and a logical address 89 is assigned to the next sector corresponding to the track address 8 and the sector address 2.
It is necessary for effecting such a defect management method to convert a logical number (i.e., a logical address) into a physical number (i.e., a physical address). Therefore, in case of performing SDM in a conventional device, a defect area table as illustrated in FIG. 16 is used for conversion of logical addresses into physical addresses. Further, in case of performing LDM in a conventional device, a replacement table as illustrated in FIG. 17 is used for conversion of logical addresses into physical addresses.
FIG. 16 illustrates the defect area table in which physical addresses of defect sectors detected at the time of initialization of an optical disk are arranged in ascending order thereof. FIG. 17 shows the replacement table in which physical addresses of defect sectors detected at the time of initialization of an optical disk, as well as physical addresses of alternate sectors of a spare area for these defect sectors, are arranged in ascending order thereof. When converting logical addresses into physical addresses by using these tables, comparison of each of physical addresses (i.e., serial numbers respectively assigned to sectors arranged from left to right and from top to bottom in cases of FIGS. 14 and 15) of defective sectors recorded in the defect area table with a given logical address is started from Row or Cell 1 of the defect area table. Thus it is detected or determined how many defect sectors of which the physical addresses are less than the given logical address are present. Then, a physical address corresponding to the given logical address is calculated by adding the determined number of the defective sectors to the given logical address. Simultaneously, the replacement table is retrieved, considering whether or not a sector corresponding to the calculated physical address is replaced with an alternate sector.
In case of read and write operations of a conventional device employing such a conversion method, when a starting logical address and a transmission block number (i.e., the number of blocks to be transmitted) are given, there is the necessity of performing the above described conversion within the range of the number of blocks to be transmitted (hereunder sometimes referred to as transmission blocks). Moreover, in case where user areas are divided into zones, the number of spare areas contained in each zone and defects contained in each spare area should be taken into consideration. Consequently, the process of the conversion becomes very complex.
The present invention is accomplished to eliminate the above described drawbacks of the prior art.
It is, accordingly, an object of the present invention to provide a method for managing a defect in a storage medium, which can easily convert a logical address into a physical address.